<template>
  <div>
   <div>
      <span class="scope">时间范围</span>
    <el-date-picker
      v-model="value1"
      type="datetimerange"
      start-placeholder="开始日期"
      end-placeholder="结束日期"
      :default-time="['12:00:00']"
    >
    </el-date-picker>
    <el-button class="cx" type="primary">查询</el-button>
   </div>


 <columnar-chart
  title="订单统计"
      :lengend="['订单金额']"
      :options="options"
 ></columnar-chart>
     

    

  </div>
</template>

<script>
import ColumnarChart from "@/components/charts/ColumnarChart.vue";
import {getgoodsData} from '@/api/order'

export default {
  components:{
    ColumnarChart,
   
  },
  data() {
    return {
        options: {
        orderData: [],
        xData: [],
      },
      value1: "",
      value2: "",
    };
  },
async created(){
   let res=await getgoodsData()

   this.options.orderData=res.data.orderData
   this.options.xData=res.data.xData
  
 }

   
};
</script>

<style lang="less" scoped>
.scope {
  margin-right: 10px;
  color: #333;
}
.cx {
  margin-left: 10px;
}

</style>
